<%= form_for(@user, :html => {:multipart => true}) do |f| %>

<div class="buttons">
	<table>
		<tr>
			<td>
			<div class="actions">
				<%= f.submit t('Save'), :id => "yt0" %>
			</div></td>
			<td><%= link_to t('Cancel'), manager_users_path, :method => :get, :class => "button" %></td>
		</tr>
	</table>
</div>
</div>
<div class="content">
	<div id="tab-data">
		<table class="form">
			<% if @user.errors.any? %>
			<tr>
				<td colspan = 2>
				<div id="error_explanation">
					<h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2>

					<ul>
						<% @user.errors.full_messages.each do |msg| %>
						<li>
							<%= msg %>
						</li>
						<% end %>
					</ul>
				</div></td>
			</tr>
			<% end %>
			<tr>
				<td><span class="required">*</span><%= t('ID Number') %> </td>
				<td> <%= f.text_field :idnumber %> </td>
			</tr>
			<tr>
				<td><span class="required">*</span><%= t('Email') %> </td>
				<td> <%= f.text_field :email %> </td>
			</tr>
			<tr>
				<td><span class="required">*</span><%= t('Password') %> </td>
				<td> <%= f.password_field :password, :value => @user.password %> </td>
			</tr>
			<tr>
				<td><span class="required">*</span><%= t('Username') %> </td>
				<td> <%= f.text_field :fullname %> </td>
			</tr>
			<tr>
				<td><%= t('Address') %></td>
				<td> <%= f.text_field :address %> </td>
			</tr>
			<tr>
				<td><%= t('Phone Number') %></td>
				<td> <%= f.text_field :phone %> </td>
			</tr>
			<tr>
				<td><%= t('Role') %></td>
				<td><%= f.select :role, { "User" => "0", "Admin" => "1"} %></td>
			</tr>
		</table>
	</div>
</div>
</div>
<% end %>